import { GET_MUSIC_LIST } from './actionsTypes';
import axios from 'axios';
export const getMusicList = (obj) => {
  return {
    type: GET_MUSIC_LIST,
    obj
  }
}

const getMusicListData = () => {
  return (dispatch) => {
    return axios.get("http://localhost:8022/oa/imgs/getImgList")
    .then((res) => {
      dispatch(getMusicList({
        list: res.data.data.data
      }))
    })
  }
}

export default getMusicListData;